<template>
    <div class="test">
        <h2 >学校名称:{{name}}</h2>
        <h2>学校地址:{{address}}</h2>
        <button @click="sendSchoolName">传递学校名给App</button>
    </div>
</template>

<script>

    export default {
        name:'School',
        data() {
            return {
                name:'XXXssssaaa',
                address:'NJ'
            }
        },
        props:['getSchoolName'],
        methods:{
            sendSchoolName(){
                this.getSchoolName(this.name);
            }
            
        }

    }
</script>

<style scoped>
    .test{
        background-color: orange;
        padding: 5px;
    }
</style>

<style scoped>

</style>
